package com.alibaba.citrus.cr.forecast.repository;

import com.alibaba.cz.base.tool.page.PageResult;
import com.alibaba.lattice2.epoch.sdk.model.Result;
import com.epoch.app.crforecastsales.domian.forecastorder.dto.BatchQueryForecastByBizNoResponse;
import com.epoch.app.crforecastsales.model.dto.PageQueryForecastLineRequest;
import com.epoch.app.crforecastsales.model.dto.QueryAvailableInventoryRequest;
import com.epoch.app.crforecastsales.model.dto.SearchForecastOrderRequest;
import com.epoch.app.crforecastsales.sdo.ForecastOrderSDO;
import com.epoch.app.crunifiedinventory.model.dto.GetListWarehouseStockRequest;
import com.epoch.app.crunifiedinventory.model.dto.WarehouseInventory;

import java.util.List;

/**
 * @author: qiaojiange
 * @create: 2021/09/15
 * @Description 请描述类的业务用途
 */
public interface ForecastOrderQueryRepository {
    /**
     * 根据订单ID查询订单详情
     */
    ForecastOrderSDO load(String  id);

    PageResult<List<ForecastOrderSDO>> pageQuery(ForecastOrderSDO forecastOrderSDO);

    ForecastOrderSDO queyrDetail(String orderId);

    ForecastOrderSDO queyrDetail(String orderId,boolean isQueryCredit);

    List<ForecastOrderSDO> batchQueryForecastOrder(List<String> ids);
    /**
     * 查询信贷
     */
    //QueryCreditResponse queryCredit(List data);
    /**
     * 查询可用库存
     */
    Double queryInventory(QueryAvailableInventoryRequest queryAvailableInventoryRequest);
    @Deprecated
    PageResult<List<ForecastOrderSDO>> pageQueryByEs(PageQueryForecastLineRequest pageQueryForecastLineRequest);

    Result<List<ForecastOrderSDO>> pageQueryByEs(SearchForecastOrderRequest searchForecastOrderRequest);

    Result<Long> countForecastOrder(SearchForecastOrderRequest searchForecastOrderRequest);

    Result<String> sumMoneyForecastOrder(SearchForecastOrderRequest searchForecastOrderRequest);

    List<WarehouseInventory> getListWarehouseStock(GetListWarehouseStockRequest getListWarehouseStockRequest);

    BatchQueryForecastByBizNoResponse batchQueryForecastByBizNo(List<String> bizOrderNos);
}
